<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>6-6 </title>
    <style>
        * {
            margin: 0px;
            padding: 0px;
        }
        
        .backgrounddiv {
            height: 1125px;
            width: 1800px;
            background-color: rgb(221, 236, 165);
            background-image: url(image/6-6.1.jpg);
            background-size: contain;
        }
        
        .bigdiv {
            height: 141px;
            width: 879px;
            background-color: rgb(250, 243, 244);
            float: left;
            margin: 300px;
        }
        
        .div1 {
            height: 135px;
            width: 216px;
            background-color: skyblue;
            float: left;
            margin: 3px;
            background-image: url(image/6-6.1.jpg);
            background-size: contain;
        }
        
        .div2 {
            height: 135px;
            width: 216px;
            background-color: red;
            float: left;
            margin: 3px 0px;
            background-image: url(../image/6-6.2.jpg);
            background-size: contain;
        }
        
        .div3 {
            height: 135px;
            width: 216px;
            background-color: black;
            float: left;
            margin: 3px;
            background-image: url(../image/6-6.3.jpg);
            background-size: contain;
        }
        
        .div4 {
            height: 135px;
            width: 216px;
            background-color: red;
            float: left;
            margin: 3px 0px;
            background-image: url(../image/6-6.4.jpg);
            background-size: contain;
        }
    </style>
</head>

<body>
    <div class="backgrounddiv">
        <div class="bigdiv">
            <div class="div1"></div>
            <div class="div2"></div>
            <div class="div3"></div>
            <div class="div4"></div>
        </div>
    </div>
    <script>
        var div1 = document.querySelector('.div1');
        div1.onclick = function() {
            var backgrounddiv = document.querySelector('.backgrounddiv');
            backgrounddiv.style.backgroundImage = 'url(../image/6-6.1.jpg)';
        }
        var div2 = document.querySelector('.div2');
        div2.onclick = function() {
            var backgrounddiv = document.querySelector('.backgrounddiv');
            backgrounddiv.style.backgroundImage = 'url(../image/6-6.2.jpg)';
        }
        var div3 = document.querySelector('.div3');
        div3.onclick = function() {
            var backgrounddiv = document.querySelector('.backgrounddiv');
            backgrounddiv.style.backgroundImage = 'url(../image/6-6.3.jpg)';
        }
        var div4 = document.querySelector('.div4');
        div4.onclick = function() {
            var backgrounddiv = document.querySelector('.backgrounddiv');
            backgrounddiv.style.backgroundImage = 'url(../image/6-6.4.jpg)';
        }
    </script>
</body>

</html>